#!/usr/bin/python

class ShortInputException(Exception):
    def __init__(self, length, atleast):
        Exception.__init__(self)
        self.length = length
        self.atleast = atleast

def main():
    try:
        s = raw_input("Enter somethin -->")
        if len(s) < 3:
            raise ShortInputException(len(s), 3)
    except EOFError:
        print("\nWhy did you do an EOF on me?")
    except ShortInputException, x:
        print("\nShortInputException: The input was of length %d, Was expection at least %d" % (x.length, x.atleast))

if __name__ == '__main__':
    main()
